//Version control system copyright 2011-2013 Kevin Zhou
var vernum=6;
//Reason is vernum-1. So if current vernum is 13, then you do reason[12]
var reason = new Array();
reason[2] = "Bug fixes";
reason[3] = "Added syntax highlighting. Does not work in IE or Firefox.";
reason[4] = "Changed CSS, default code is now indented. Minor update";
reason[5] = "Added license, corrected some typos";
var reasonComplete = "\nReasons:\n";
for (var i = thisvernum; i<vernum;i++){
	reasonComplete += "  -  " + reason[i] + "\n";
}
if(vernum!=thisvernum){
	if(confirm("There is a new version available. Attempting to download if you press OK.\nYour version: "+thisvernum+"\nNewest Version: "+vernum+reasonComplete)){
		window.location="http://adf.ly/Ruhn7";
	}
}
var browserLoc = window.location.toString();
/*if (browserLoc.indexOf("http://") != -1 || browserLoc.indexOf("https://") != -1) {
	if (browserLoc.indexOf("localhost") == -1) {
		while (true) {
			alert("Whoa there, Tryit Editor Instant CANNOT BE UPLOADED TO THE WEB!!! Did you even read readme.txt???");
			self.close();
		}
		document.open();
		document.write("This was not meant to be uploaded to the web. Please visit <a href=\"http://tryiteditor.webs.com/instant/\" title=\"Tryit Editor Instant\">http://tryiteditor.webs.com/instant/</a> for the authentic version.");
		document.close();
	}
}*/
if (browserLoc.indexOf("/var/mobile/Applications") != -1) {
	while (true) {
		alert("This application is not meant to be embedded in an iPhone application. Please contact the dev of the app for further information.");
	}
}
